<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<html>
<head>
<title>澳斯浪廷会员平台</title>
<link href="resources/css/dl.css" type="text/css" rel="stylesheet" />
<script type="text/javascript">
	//登录非空验证
	function check() {
		username = document.login.username;
		pwd = document.login.password;
		code = document.login.code;
		if (username.value.length == 0) {
			alert("用户名不能为空");
			username.focus();
			return false;
		}else if (pwd.value.length == 0) {
			alert("密码不能为空");
			pwd.focus();
			return false;
		}else if(code.value.length==0){
			alert("验证码不能为空");
			code.focus();
			return false;
		}
		return true;
	}
	
	//验证码刷新
	function reLoadImage() {
		document.getElementById("img_rand_code").src = "image.action?r=" + Math.random();
	}
	
	function authUser(){
		if(check()){
			//document.forms[0].action = "${ctx}/login.action";
	        document.forms[0].submit();
		}
	}
	
	function downIos(){
		alert("即将上线，敬请期待!");
	}
	
	function downExcelTemplet(inputPath,downloadFileName) {
		if(downloadFileName == null){
			return;
		}
		var showname = escape(encodeURIComponent(downloadFileName));
		var url ='download.action?inputPath='+inputPath+'&downloadFileName='+showname+'&_isExternal=true';
		window.location= url;
	}
</script>
</head>

<body>
<div class="main">
	<form action="login.action" method="post" name="login">
	    <div class="yhm">账　号：<input name="username" type="text" class="zh" size="32" /></div>
	    <div class="yhm">密　码：<input name="password" class="zh" type="password" size="32" /></div>
	    <div class="yhm">验证码：<input name="code" type="text" class="zh" size="10" onkeypress="if(event.keyCode==13) {btn.click();return false;}"/>
	    	<img title="单击刷新验证码" id="img_rand_code" onclick="reLoadImage();" src="image.action" />
	    </div>
	    <div class="tishi"><c:if test="${not empty loginMsg}">${loginMsg }</c:if></div>
    </form>   
    <div class="banquan">
        <div class="mima"><font color="#fff">版权所有：澳斯浪廷</font></div>
        <div class="icon"><img onclick="authUser();" src="resources/images/denglu.jpg" id="btn" name="btn"/><span><!-- 忘记密码？ --></span></div>
    </div>
    <div class="xiazai"><img src="resources/images/xiazai.png" border="0" usemap="#Map" />
      <map name="Map" id="Map">
        <area shape="rect" coords="-5,0,112,32" href='download.action?inputPath=/usr/local/oslt.apk&downloadFileName=OSLT.apk&_isExternal=true'/>
        <area shape="rect" coords="130,1,226,32" href="javascript:downIos();"/>
      </map>
    </div>
</div>
</body>
</html>


<!-- <html>
<body>
<h2>Hello World!</h2>
<a href="registerPage.action">注册</a>
</body>
</html> -->
